<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt"%>
<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
    <title>标准信息表</title>
    <style type="text/css">
    	h1,p,td,th{
    		text-align: center;
    	}
    	.null{
    		height: 200px;
    		vertical-align: middle;
    		font-size: 24px;
    		font-weight: bolder;
    		color:red;
    	}
    	.double,th{
    		background-color: #DDD;
    	}
    	table{
    		width:100%;
    		border: 1px solid #FFF; 
    	}
    </style>
  </head>
  
  <body>
  	<h1>标准信息列表</h1>
  	<form action="">
  		<p>
  			<input type="text" name="search" id="search" value="${search }">
  			<input type="submit" value="提交检索">
  			<a href="add.html" ><input type="button" value="新增标准"></a>
  			<button onclick="shanChu()">删除标准</button>
  		</p>
  	</form>
  	<form action="">
	  	<table>
	  		<tr>
	  			<th><input type="checkbox"></th>
	  			<th>标准号</th>
	  			<th>中文名称</th>
	  			<th>版本</th>
	  			<th>发布日期</th>
	  			<th>实施日期</th>
	  			<th>操作</th>
	  		</tr>
	  		<c:choose>
		  		<c:when test="${empty std}">
		  			<tr>
		  				<td colspan="7" class="null">没有找到信息</td>
		  			</tr>
		  		</c:when>
		  		<c:otherwise>
		  			<c:forEach var="std" items="${std }" varStatus="status">
						<tr <c:if test="${status.index%2==0}"> class="double" </c:if> id="${std.id}">
							<th><input type="checkbox" name="sid" value="${std.id }"></th>
							<td>${std.stdNum }</td>
							<td>${std.zhname }</td>
							<td>${std.version }</td>
							<td>
								<fmt:formatDate value="${std.releaseDate }" pattern="yyyy-MM-dd"/>
							</td>
							<td>
								<fmt:formatDate value="${std.implDate }" pattern="yyyy-MM-dd"/>
							</td>
							<td>
								<a href="">下载</a>
								<a href="">修改</a>
							</td>	
						</tr>  			
		  			</c:forEach>
		  		</c:otherwise>
	  		</c:choose>
	  	</table>
	</form>
  	<script type="text/javascript" src="<%=basePath%>static/js/jquery-1.12.4.min.js"></script>
  	<script type="text/javascript">
  		function shanChu(id){
  			
  		}
  		
  	</script>
  </body>
</html>
